Skip to content

fix(parser): handle all token types in process substitution reconstruction#1073

Merged
chaliy merged 1 commit intomainfrom
fix/process-sub-token-reconstruction
Apr 5, 2026
Merged

fix(parser): handle all token types in process substitution reconstruction#1073
chaliy merged 1 commit intomainfrom
fix/process-sub-token-reconstruction

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 5, 2026

Summary

  • Add explicit handlers for all token types (DoubleLeftBracket, DoubleRightBracket, DoubleLeftParen, DoubleRightParen, DoubleSemicolon, SemiAmp, DoubleSemiAmp, Assignment, RedirectBoth, Clobber, DupInput, HereDoc, HereDocStrip, RedirectFdAppend, DupFd, DupFdIn, DupFdClose, RedirectFdIn, ProcessSubIn, ProcessSubOut, Error) in the process substitution token reconstruction loop
  • Previously these tokens fell through to the catch-all branch and were silently dropped, causing process substitutions containing [[ ]], (( )), and other compound constructs to fail
  • Add 3 new tests covering [[ ]] conditionals, while+break with conditionals, and (( )) arithmetic inside process substitutions

Test plan

  • cargo test -p bashkit --lib -- test_process_sub — all 7 tests pass (4 existing + 3 new)
  • cargo fmt --check — clean
  • CI green

…ction

Add explicit handlers for DoubleLeftBracket, DoubleRightBracket,
DoubleLeftParen, DoubleRightParen, DoubleSemicolon, SemiAmp,
DoubleSemiAmp, Assignment, RedirectBoth, Clobber, DupInput, HereDoc,
HereDocStrip, RedirectFdAppend, DupFd, DupFdIn, DupFdClose,
RedirectFdIn, ProcessSubIn, ProcessSubOut, and Error tokens in the
process substitution token reconstruction loop. Previously these fell
through to the catch-all branch and were silently dropped.
@chaliy chaliy merged commit ff6624a into main Apr 5, 2026
27 checks passed
@chaliy chaliy deleted the fix/process-sub-token-reconstruction branch April 5, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant